﻿using SqlSugar;
using System;

namespace WMS.Model
{
    [SugarTable("Role")]
    public class RoleModel : BaseModel
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [SugarColumn(ColumnName = "RoleName", Length = 50, IsNullable = false)]
        public string RoleName { get; set; }

        /// <summary>
        /// 角色描述
        /// </summary>
        [SugarColumn(ColumnName = "RoleDesc", Length = 200, IsNullable = true)]
        public string RoleDesc { get; set; }

        /// <summary>
        /// 状态：0-禁用，1-启用
        /// </summary>
        [SugarColumn(ColumnName = "Status", DefaultValue = "1")]
        public byte Status { get; set; } = 1;

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "CreateTime", DefaultValue = "GETDATE()")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "UpdateTime", DefaultValue = "GETDATE()")]
        public DateTime UpdateTime { get; set; } = DateTime.Now;
    }

    public class AddRoleModelDto()
    {
 
        public string RoleName { get; set; }

        public string? RoleDesc { get; set; }
    }

    public class UpdateRoleModelDto()
    {
        public long Id { get; set; }
        public string RoleName { get; set; }

        public string? RoleDesc { get; set; }

        public byte Status { get; set; }
    }
}